]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
recorder: Fall back to ~ if XDG_VIDEOS_DIR doesn't exist
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 13 Apr 2016 19:22:56 +0000 (21:22 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 13 Apr 2016 19:25:31 +0000 (21:25 +0200)
Unlike screenshots, recordings fail when the default directory doesn't
exist. Fall back to home instead.

https://bugzilla.gnome.org/show_bug.cgi?id=765015

src/shell-recorder.c

index 62ef0c4cc18c0a1ec8b3416dbe121d829b96b99d..84d68f56b9a07d05175975cae27128b536bf6cec 100644 (file)
@@ -944,6 +944,9 @@ get_absolute_path (char *maybe_relative)
   else
     {
       const char *video_dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS);
+      if (!g_file_test (video_dir, G_FILE_TEST_EXISTS))
+          video_dir = g_get_home_dir ();
+
       path = g_build_filename (video_dir, maybe_relative, NULL);
     }